<template>
  <p>
    每次增加1：<button @click="increase">+</button>
    数字：{{this.$store.state.add}}
  </p>

  <p>
    每次减少1：<button @click="reduse">-</button>
    数字：{{this.$store.state.reduce}}
  </p>
</template>

<script setup>
import { useStore} from 'vuex'
const store = useStore()
const increase = () => {
store.commit('increase')
}
const reduse = () => {
store.commit('reduse')
}
</script>

<style>
button{
  background-color: aquq;
}
</style>